package com.clinic.action.usercontact;

import org.springframework.beans.factory.annotation.Autowired;

import com.clinic.action.user.UserAction;
import com.clinic.entity.gui.GuiUserContact;
import com.clinic.logic.usercontact.UserContactLogic;

public class UserContactAction extends UserAction{

	@Autowired
	private UserContactLogic userContactLogic;
	
	private static final long serialVersionUID = 5033363773965255029L;
	private GuiUserContact guiUserContact;
	
	public String registration() {
		return ActionResult.SUCCESS;
	}
	
	public String show(){
		guiUserContact = userContactLogic.getUserContactDetailsByUserId(id);
		return ActionResult.SUCCESS;
	}

	public String edit(){
		guiUserContact = userContactLogic.getUserContactDetailsByUserId(id);
		if(guiUserContact.isAvailable()) {
			return ActionResult.SUCCESS;
		}
		return ActionResult.FAILED;
	}
	
	public String delete(){
		return ActionResult.SUCCESS;
	}
	
	public String update(){
		return ActionResult.SUCCESS;
	}
	
	public String insert() {
		return ActionResult.SUCCESS;
	}
	
	public UserContactLogic getUserContactLogic() {
		return userContactLogic;
	}
	
	public void setUserContactLogic(UserContactLogic userContactLogic) {
		this.userContactLogic = userContactLogic;
	}
	
	public GuiUserContact getGuiUserContact() {
		return guiUserContact;
	}
	
	public void setGuiUserContact(GuiUserContact guiUserContact) {
		this.guiUserContact = guiUserContact;
	}
}
